package xdu.ble.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @Author com.alibaba.lizhen
 * @Date 2021/1/14 11:43 上午
 * @Version 1.0
 * @Description 响应码
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionCode {


    OK(200, "操作成功"),


    PERMISSION_NOT_ENOUGH(300, "您没有更改权限，请联系超级管理员或者设备激活所属管理员"),

    ADMIN_NOT_REGISTER(301, "该手机号尚未注册，请您先注册"),




    USER_NOT_LOGIN(400, "用户未登陆"),
    PHONE_HAS_REGISTER(401, "手机号已注册"),
    ID_CARD_HAS_REGISTER(402, "身份证已注册"),
    ID_CARD_AND_PHONE_BOTH_NULL(403, "请输入手机或身份证"),
    USER_NOT_EXIST(404, "用户不存在"),
    PHONE_OR_PASSWORD_ERROR(405, "手机号或密码错误"),

    WRIST_HAS_BEEN_ACTIVE(406, "该手环已经被激活过"),
    WRIST_NOT_ACTIVE_OR_EXIST(407, "手环未被激活或不存在"),

    ALARM_HAS_BEEN_ACTIVE(420, "该报警器已经被激活过"),
    ALARM_NOT_ACTIVE_OR_EXIST(421, "报警器未被激活"),



    SERVICE_ERROR(501, "服务器错误"),
    DB_UPDATE_ERROR(502, "数据库更新出错"),

    ;
    //状态码
    private int code;

    //原因
    private String reason;


}
